{extend name="../back" /}
{block name="main"}
<div class="d-flex justify-content-start align-items-center mb-3">
  <div class="btn-group btn-group-sm me-4" role="group">
    <a class="btn btn-secondary" href="{:dcUrl('admin/logs/index')}"><i class="iconfont icon-list-alt mx-1"></i></a>
    <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown"><i class="iconfont icon-filter"></i></button>
    <div class="dropdown-menu">
      <a class="dropdown-item {:dcDefault($type,'inc','active')}" href="{:dcUrl('admin/logs/index',['name'=>'chatgpt'])}">ChatGpt</a>
      <a class="dropdown-item {:dcDefault($type,'dec','active')}" href="{:dcUrl('admin/logs/index',['name'=>'recharge'])}">Recharge</a>
    </div>
  </div>
  <div class="btn-group btn-group-sm" role="group">
    <a class="btn {:dcDefault($type,'inc','btn-secondary','btn-outline-secondary')}" href="{:dcUrl('admin/logs/index',['type'=>'inc'])}">增长记录</a>
    <a class="btn {:dcDefault($type,'dec','btn-secondary','btn-outline-secondary')}" href="{:dcUrl('admin/logs/index',['type'=>'dec'])}">消耗记录</a>
  </div>
</div>
<table class="table table-striped table-bordered table-hover">
  <thead>
    <tr>
      <th>ID</th>
      <th>名称</th>
      <th>整数</th>  
      <th>小数</th>
      <th>模型</th>
      <th>类型</th>
      <th>状态</th>
      <th>INFOID</th>
      <th>USERID</th>
      <th>操作时间</th>
      <th>操作IP</th>
    </tr>
  </thead>
  <tbody>
    {volist name="list" id="item"}
    <tr>
      <td>{$item.log_id}</td>
      <td>{$item.log_name}</td>
      <td>{$item.log_value}</td>
      <td>{$item.log_decimal}</td>
      <td>{$item.log_model}</td>
      <td>{$item.log_type}</td>
      <td>{$item.log_status}</td>
      <td>{$item.log_ai_id}</td>
      <td>{$item.log_user_id}</td>
      <td>{$item.log_time|date='Y-m-d H:i:s'}</td>
      <td>{$item.log_ip}</td>
    </tr>
  {/volist}
 </tbody>
</table>
{$pages|raw}
{/block}